/**
 * @file
 * @brief Collection of several utilities and helpers used in demolib.
 */

#ifndef NOSAL_DEMOLIB_INTERNAL_UTILITY_H
#define NOSAL_DEMOLIB_INTERNAL_UTILITY_H

#include <string>

#include "nosal/demolib/common.h"

namespace netaos {
namespace nosal {
namespace demo {
namespace lib {
namespace internal {

inline std::string ReturnValueToString(ReturnValue level) {
    switch (level) {
        case ReturnValue::kWrongParameter:
            return {"WrongParameter"};
        case ReturnValue::kError:
            return {"Error"};
        case ReturnValue::kOk:
            return {"Ok"};
        case ReturnValue::kTrue:
            return {"True"};
        default:
            break;
    }

    return std::to_string(static_cast<unsigned>(ReturnValueToIntegral(level)));
}

}  // namespace internal
}  // namespace lib
}  // namespace demo
}  // namespace nosal
}  // namespace netaos

#endif  // NOSAL_DEMOLIB_INTERNAL_UTILITY_H
